﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Department.admin
{
    public partial class ErrorPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string error = string.Empty;
            string type = string.Empty;

            if (Request.Params["err"] == null || Request.Params["type"] == null)
            {
                Response.Redirect("/admin/Default.aspx");
            }
            type = Request.Params["type"];
            error = Request.Params["err"];
            if(type.Equals("sql")) 
                ErrorType.Text = "Възникна грешка с базата от данни!";
            else
                ErrorType.Text = "Възникна грешка";
            ErrorMessage.Text = error;
        }
    }
}